<template>
  <div class="friend">
    <el-card class="box-card">
      <div slot="header" class="d-flex align-items-center">
        <img class="card-icon" src="../assets/images/lianjie.png" />
        <span>{{ $t("friend.friend") }}</span>
        <el-button class="ml-auto" style="padding: 3px 0" type="text">
          <router-link to="/apply" tag="span">{{
            $t("friend.exchange")
          }}</router-link>
        </el-button>
      </div>
      <div class="text item" v-for="link in list" :key="link.id"><a :href="link.href">{{link.name}}</a></div>
    </el-card>
  </div>
</template>

<script>
import request from "../api/link";
export default {
  name: "friend",
  data() {
    return {
		list: []
	}
  },
  created() {
	  this.getLinkList()
  },
  methods: {
    getLinkList() {
      request.getLinkList().then((res) => {
        console.log(res);
        this.list = res.data.data
      });
    },
  },
};
</script>

<style scoped>
.box-card .item a {
  text-decoration: none;
  /*color: #F56C6C;*/
}
.box-card span {
  font-weight: bold;
}
.card-icon {
  width: 20px;
  height: 20px;
  margin-right: 10px;
}
</style>